﻿using UnityEngine;
using System.Collections;

public class Boss : MonoBehaviour {

	// Use this for initialization
	void Start () {

        Entity entity = GetComponent<Entity>();
        BossLogic bossLogic = GetComponent<BossLogic>();

        entity.setKind(GameConfig.ENEMY);


        entity.onHurt += delegate (object obj)
        {

        };


        entity.onDie += delegate (object obj)
        {

        };

        bossLogic.onNormalAttack += delegate () {
            for (int i = 0; i < 12; i++) {
                Invoke("sendNormalBullet", i * 0.1f);
            }
        };
	}

    void sendNormalBullet() {
        BulletManager.createNormalBullet(GameConfig.ENEMY,
            transform.position, Random.Range(-40,40), false,8);
    }
	
	// Update is called once per frame
	void Update () {
    }
}
